/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.goods;

import com.enation.app.javashop.client.goods.SearchKeywordClient;
import com.enation.app.javashop.core.client.fallback.goods.SearchKeywordClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
* @author liuyulei
 * @version 1.0
 * @Description: 关键词所搜历史对外接口
 * @date 2019/5/28 11:07
 * @since v7.0
 */
@FeignClient(name = "goods-service", fallbackFactory = SearchKeywordClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface SearchKeywordClientFeignImpl extends SearchKeywordClient {

    /**
     * 添加搜索关键字
     * @param keyword
     */
    @Override
    @RequestMapping(value = "/client/search-keyword", method = RequestMethod.POST)
    void add(@RequestParam("keyword")String keyword);

    /**
     * 更新关键字数据
     * @param keyword
     */
    @Override
    @RequestMapping(value = "/client/search-keyword/update", method = RequestMethod.POST)
    void update(@RequestParam("keyword")String keyword);

    /**
     * 判断关键字是否存在
     * @param keyword
     * @return
     */
    @Override
    @RequestMapping(value = "/client/search-keyword", method = RequestMethod.GET)
    boolean isExist(@RequestParam("keyword") String keyword);
}
